package com.pay.enums;

import java.util.ArrayList;
import java.util.List;

import com.pay.utils.FunctionUtils;


/**
 * 商户金额操作类型
 * @author arno
 *
 */
public enum MerchantAccountTypeEnums {
	
	orderIn(1, "订单收入"),
	system(2, "系统操作"),
	cash(3, "提现"),
	tax_out(4,"费率扣除"),
	cash_reject(5,"提现驳回") ;
	
	private Integer id;
	 
    private String name;

    public Integer getId() {
		return id;
	}
	
	public void setId(Integer id) {
		this.id = id;
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
 
	private MerchantAccountTypeEnums(Integer id,String name){
		this.id=id;
		this.name=name;
	}
	
	public static List<MerchantAccountTypeEnums> queryList(){
		List<MerchantAccountTypeEnums> list=new ArrayList<MerchantAccountTypeEnums>();
		for(MerchantAccountTypeEnums o:MerchantAccountTypeEnums.values()){
			list.add(o);
		}
		return list;
	}
	
	public static String getName(Integer id){
		String str="";
		for(MerchantAccountTypeEnums o:MerchantAccountTypeEnums.values()){
			if(FunctionUtils.isEquals(id, o.getId())){
				str= o.getName();
				break;
			}
		}
		return str;
	}

	
}
